<%@ page language="java" import="java.util.*,com.hs.dnms.model.*,com.hs.core.utils.*,com.hs.core.cache.*" pageEncoding="utf-8"%>
<%
	String maganame = (String)request.getAttribute("maganame");
	String periodicalname = (String)request.getAttribute("periodicalname");
	String state = (String)request.getAttribute("state");
	PageUtil pageUtil = (PageUtil)request.getAttribute("dataList");
    String pageStr = ""; 
    int perpageCount = 1;
    int currentPage = 1;
    List dataList = null;
    if(null != pageUtil){
	   dataList = pageUtil.getPageList();
	   pageStr = pageUtil.getPageStr();
	   perpageCount = pageUtil.getNumberPerPage();
	   currentPage = pageUtil.getCurrentPage();
	} 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<%@ include file="../../include.jsp"%> 
<script src='<%=basePath%>dwr/interface/auditdwr.js'></script> 
<script language=JavaScript>
 //查询
 function searchData()
{
	document.searchform.submit();
}
//查看加工信息
 function auditInfo(id){
	var pageURL = "<%=basePath %>audit/auditlistFrame.do?id=" + id;
	openwindow(pageURL,'1000','800',''); 
    //window.location.href=pageURL;
 }
 //退回
 function audit(id,state)
{	
	if(confirm("确认退回重新加工吗?")){
		auditdwr.audit(id,state,callback4audit)
	}
}

 function callback4audit(message){
        alert("退回成功"); 
 	    document.searchform.submit();
 	 
 }
</script>
</head>
<body>
<div class="cont">
    <dl class="deta_list">
         	<form name="searchform" action="<%=basePath %>audit/completedAuditlist.do" >
			    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="deta_list_sear">
			      <tr>
			        <td width="15%">
			           标题：
			          </td>
			          <td width="20%"> 
			           <input name="maganame" type="text" value="<%=maganame == null?"":maganame%>" class="sear_input"/>
			           </td> 
			           <td width="15%">
			           出版物：
			          </td>
			          <td width="20%">
			           <input name="periodicalname" type="text" value="<%=periodicalname == null?"":periodicalname%>" class="sear_input"/>
			           </td>
			           <td width="15%">
			            <input name="search" type="button" value="查询"  onclick="searchData();" class="butt2"/>
			            </td>
			        </tr>
			    </table>
                <table border="0" cellspacing="0" cellpadding="0" class="list">
                  <tr>
                    <th width="4%">序号</th>
                    <th width="25%">标题</th>
                    <th width="23%">出版物</th>
                    <th width="20%">作者</th>
                    <th width="4%">年份</th>
                    <th width="6%" >加工人</th>
                    <th width="6%" >审核人</th> 
                    <th width="6%" >审核结果</th> 
                    <th width="6%" >操作</th> 
                  </tr>
                   <%if(dataList != null && dataList.size()>0){ 
			   			 for(int i =0;i<dataList.size();i++){
			     		    DnmsMagazine obj = (DnmsMagazine)dataList.get(i); 
 					%>
                  <tr>
                    <td><%= perpageCount*(currentPage-1)+i+1 %></td>
                    <td><a href="javaScript:auditInfo('<%=obj.getId() %>')"><%= obj.getMaganame()==null?"":obj.getMaganame() %></a></td>
                    <td><%= obj.getPeriodicalname()==null?"":obj.getPeriodicalname() %></td>
                    <td><%= obj.getAuthor()==null?"":obj.getAuthor() %></td>
                    <td><%= obj.getYear()==null?"":obj.getYear() %></td>
                    <td><%= obj.getDataproducer()==null?"":obj.getDataproducer().getUserinfo()==null?"":obj.getDataproducer().getUserinfo().getUsername() %></td>
                    <td><%= obj.getPictureproducer()==null?"":obj.getPictureproducer().getUserinfo()==null?"":obj.getPictureproducer().getUserinfo().getUsername() %></td>
                    <td><font color=red><strong>
                    <%=DictCacheUtil.getInst().selectStr4Display(obj.getState()+"","15") %></strong></font></td>
                     <td><input onclick="audit('<%=obj.getId() %>','4');" type="button" value="退回" class="but_3"/></td>
                  </tr>
                  
         		 <%}}else{ %>
			 	<tr>
					<td colspan="7" align=center><font color=red>没有完成加工的数据</font></td>
			     </tr>
		  		 <%} %>
                </table>
        	</form>
        	<div class="page"><%=pageStr %></div> 
    </dl>
</div>
</body>
</html>